package top.laoshuzi.designpatterns.base.created.factory;

import org.junit.Test;
import top.laoshuzi.designpatterns.base.created.singleton.*;

public class Client {

    @Test
    public void operation() {

        //创建产品
        Product productA = ProductFactory.createProduct(ProductFactory.TYPE_PRODUCT_A);
        Product productB = ProductFactory.createProduct(ProductFactory.TYPE_PRODUCT_B);

        System.out.println(productA.getName());
        System.out.println(productB.getName());
    }

}
